<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <!-- 1.选择一个 -->
    <select name="abc" v-model="fruit">
      <option value="苹果">苹果</option>
      <option value="香蕉">香蕉</option>
      <option value="榴莲">榴莲</option>
      <option value="火龙果">火龙果</option>
    </select>
    <h2>您选择的水果是:{{fruit}}</h2>

    <!-- 2.选择多个 -->
    <!-- 当选中多个值时，就会将选中的option对应的value添加到fruits数组中 -->
    <!-- 选中多个值 按住ctrl或command键选择 -->
    <select name="abc" v-model="fruits" multiple>
      <option value="苹果">苹果</option>
      <option value="香蕉">香蕉</option>
      <option value="榴莲">榴莲</option>
      <option value="火龙果">火龙果</option>
    </select>
    <h2>您选择的水果是:{{fruits}}</h2>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        fruit:'香蕉',
        fruits: []
      },
  })
  </script>
</body>
</html>